<ion-view view-title="{{language == 0?'四方当代美术馆':'Sifang Art Museum'}}">
  <ion-content class="normal_box bg" delegate-handle="mainScroll" overflow-scroll="false">
    <div class="top_header" ng-show="payid != 0">
      <span class="header_left" ng-click="backhome()">
        <img src="img/backhome.png" class="backhome" />
      </span>
      <i class="iconfont icon-Path5 top_icon2" ng-click="gotoCenter()"></i>
      <!-- <i class="iconfont icon-Path11 top_icon3" ng-click="gotoShop()"></i> -->
    </div>

    <div class="normal_box" ng-show="payid == 0">
      <!-- header -->
      <div class="cp_header">
        <div class="cp_header1">
          <div class="cp_header_main">
            <p class="cp_header_line1">{{language == 0?'你好':'Hi'}}<span class="cp_name">{{user2.nickname}}</span></p>
            <p class="cp_header_line1">{{language == 0?'请核对以下信息并支付':'Please confirm the information below before you pay'}}</p>
          </div>
          <img src="img/check1.png" class="check_img" />
        </div>
      </div>
    </div>

    <div class="cp_content">
      <div class="normal_box" ng-show="payid == 0">
        <div class="normal_box pr20 pos_re" ng-click="show_placelist()">
          <i class="iconfont icon-right check_icon"></i>
          <p class="cp_title">{{language == 0?'地址信息':'Delivery Address'}}</p>
          <p class="cp_title1 mt8" ng-if="!order.address_id&&!order.default_address&&!pay_order.addressId">{{language == 0?'请选择收货地址':'Please choose a delivery address'}}</p>

          <p class="cp_title1 mt8 lh20" ng-if="order.address_id&&!order.default_address&&!pay_order.addressId">{{order.address_name + ' ' + order.address_phone}}<br>{{city_show_name + order.area}}</p>

          <p class="cp_title1 mt8 lh20" ng-if="!order.address_id&&order.default_address&&!pay_order.addressId">{{order.default_address.name + ' ' + order.default_address.phone}}<br>{{city_show_name + order.default_address.area}}</p>

          <p class="cp_title1 mt8 lh20" ng-if="pay_order.addressId">{{final_address.name + ' ' + final_address.phone}}<br>{{city_show_name + final_address.area}}</p>
        </div>

        <div class="order_pay_line">
          <span class="order_pay_span" ng-class="{'f12_i':language == 1}">{{language == 0?'配送时间':'Delivery Time'}}</span>
          <div class="order_pay_main">{{language == 0?'以物流公司为准':'According to express company'}}</div>
        </div>

        <div class="normal_box mt30">
          <p class="cp_title" ng-class="{'f12_i':language == 1}">{{language == 0?'支付方式':'Payment Method'}}
            <span class="fr cp_title2">{{language == 0?'微信支付':'WeChat Pay'}}</span>
          </p>
        </div>
      </div>

      <div class="normal_box" ng-show="payid != 0">
        <div class="order_pay_line">
          <span class="order_pay_span" ng-class="{'f12_i':language == 1}">{{language == 0?'订单状态':'Order Status'}}</span>
          <div class="order_pay_main"  ng-show="order.status == 0">{{language == 0?'未支付':'Unpaid'}}</div>
          <div class="order_pay_main" ng-show="order.status == 1">{{language == 0?'待发货':'Undelivered'}}</div>
          <div class="order_pay_main" ng-show="order.status == 2">{{language == 0?'已发货':'Delivered'}}</div>
          <div class="order_pay_main" ng-show="order.status == 3">{{language == 0?'已完成':'Complete'}}</div>
          <div class="order_pay_main" ng-show="order.status == 4">{{language == 0?'库存不足':'Out of Stock'}}</div>
          <div class="order_pay_main" ng-show="order.status == 5">{{language == 0?'交易关闭':'Closed'}}</div>
          <div class="order_pay_main" ng-show="order.status == 6">{{language == 0?'已取消':'Cancelled'}}</div>
        </div>

        <div class="order_pay_line">
          <span class="order_pay_span" ng-class="{'f12_i':language == 1}">{{language == 0?'订单编号':'Order No.'}}</span>
          <div class="order_pay_main">{{order.order_num}}</div>
        </div>

        <div class="order_pay_line">
          <span class="order_pay_span" ng-class="{'f12_i':language == 1}">{{language == 0?'下单时间':'Order Time'}}</span>
          <div class="order_pay_main" ng-bind="order.create_time*1000|date:'yyyy.MM.dd HH:mm'"></div>
        </div>

        <div class="order_pay_line">
          <span class="order_pay_span" ng-class="{'f12_i':language == 1}">{{language == 0?'地址信息':'Delivery Address'}}</span>
          <div class="order_pay_main">{{order.address_name + ' ' + order.address_phone}}<br>{{city_show_name + order.area}}</div>
        </div>

        <div class="order_pay_line" ng-if="order.status == 2">
          <span class="order_pay_span" ng-class="{'f12_i':language == 1}">{{language == 0?'物流信息':'Express Info'}}</span>
          <div class="order_pay_main">顺丰到付：{{order.express_num}}</div>
        </div>

        <div class="order_pay_line">
          <span class="order_pay_span" ng-class="{'f12_i':language == 1}">{{language == 0?'配送时间':'Delivery Time'}}</span>
          <div class="order_pay_main">{{language == 0?'以物流公司为准':'According to express company'}}</div>
        </div>

        <div class="order_pay_line">
          <span class="order_pay_span" ng-class="{'f12_i':language == 1}">{{language == 0?'支付方式':'Payment Method'}}</span>
          <div class="order_pay_main">{{language == 0?'微信支付':'WeChat Pay'}}</div>
        </div>
      </div>

      <div class="normal_box mt30 pb24 bb_1_cp">
        <p class="cp_title">{{language == 0?'商品信息':'Shopping Items'}}</p>

        <div class="ticket_box1" ng-repeat="list in order.products">
          <div class="div_img1" style="background-image: url({{fullPath(list.product_cover)}});">
          </div>
          <p class="ticket_line2">{{language == 0?list.product_name:list.product_name_en}}</p>
          <span class="ticket_type">{{language == 0?list.attr_name:list.attr_name_en}}</span>

          <span class="ticket_price color_black" ng-if="list.activity_price != 0&&list.activity_price!=list.price"><span class="tdlt f14 grayf"><i class="f14 grayf">￥</i>{{list.price}} </span><i> ￥</i>{{list.activity_price}}</span>

          <span class="ticket_price color_black" ng-if="list.activity_price == 0||(list.activity_price==list.price)"><i>￥</i>{{list.price}}</span>

          <span class="ticket_num3 h24"><i class="f12_i">X </i>{{list.quantity}}</span>
        </div>

      </div>

      <div class="cp_footer">
        <p class="cp_footer_line1">
          {{language == 0?'商品合计':'Shopping Items Total'}}
          <span class="fr">￥{{allprice}}</span>
        </p>
        <p class="cp_footer_line1">
          {{language == 0?'运费':'Freight'}}
          <span class="fr">{{language == 0?'顺丰到付':'Freight collect'}}</span>
        </p>
        <p class="cp_footer_line2">
          {{language == 0?'总计':'Total'}}
          <span class="fr">￥{{allprice}}</span>
        </p>
      </div>

      <div class="normal_box pd15" ng-show="(payid != 0&&order.status == 0)||(payid == 0)">
        <div class="w100 pd0_2">
          <button class="ticket_buy" ng-if="language == 0" ng-click="payOrder()">立即支付&nbsp;<span class="ticket_money">{{allquantity}}件</span><span class="ticket_money">共￥<span>{{allprice}}</span></span></button>

          <button class="ticket_buy" ng-if="language == 1" ng-click="payOrder()">Pay <span class="ticket_money">￥<span>{{allprice}} in total</span></span></button>
        </div>
      </div>

      <div class="normal_box pb15 mt15" ng-show="payid != 0&&order.status == 0">
        <div class="w100 pd0_2 tac cancle_check" ng-click="cancel_order()">
          {{language == 0?'取消订单':'Cancel'}}
        </div>
      </div>
    </div>

  </ion-content>
  <!-- 地址列表 -->
  <div class="normal_box mubu_place" ng-if="place1 == 1">
    <div class="top_header">
      <i class="iconfont icon-left top_icon1" ng-click="cancel_place()"></i>
      <span class="top_header_span" ng-click="cancel_place()">{{language == 0?'返回':'Back'}}</span>
      <!-- <i class="iconfont icon-Path5 top_icon2" ng-click="gotoCenter()"></i> -->
      <!-- <i class="iconfont icon-Path11 top_icon3" ng-click="gotoShop()"></i> -->
    </div>

    <div class="normal_box pd0_10_100">
      <div class="place_pro" ng-repeat="list in addresses" ng-click="address_choose(list)">
        <span class="place_name">{{list.name}}</span>
        <img src="img/moren.jpg" class="moren" ng-if="list.is_default == 1" />
        <p class="placelist_line1">{{list.phone}}</p>
        <p class="placelist_line2">{{list.province_name + list.city_name + list.district_name + list.area}}</p>

        <i class="iconfont icon-edit edit_icon" ng-click="gotoEdit(list)"></i>
        <i class="iconfont icon-shanchu shanchu_icon" ng-click="confirm(list)"></i>
        <!-- ng-click="delete(list)" -->
      </div>
    </div>

  </div>

  <!-- 无地址记录 -->
  <div class="noinfo_span" ng-if="!addresses&&place1 == 1">
    <!-- <div class="top_header">
      <i class="iconfont icon-left top_icon1" ng-click="cancel_place()"></i>
      <span class="top_header_span" ng-click="cancel_place()">{{language == 0?'返回':'Back'}}</span>
    </div> -->
    暂无地址
  </div>
  
  <!-- 新建地址按钮 -->
  <div class="new_address" ng-if="place1 == 1" ng-click="gotonew()">
    <div class="new_address_btn">{{language == 0?'新建地址':'New Address'}}</div>
  </div>

  <!-- 新增地址 -->
  <div class="normal_box mubu_place" ng-show="place1 == 2">
    <div class="top_header">
      <i class="iconfont icon-left top_icon1" ng-click="cancel_place()"></i>
      <span class="top_header_span" ng-click="cancel_place()">{{language == 0?'返回':'Back'}}</span>
    </div>

    <div class="normal_box pd16">

      <div class="fix_pro" ng-class="{'input_chosen':inputc == 1}">
        <input class="fix_input" placeholder="{{language == 0?'姓名':'Name'}}" ng-focus="choen(1)" ng-model="user.name" />
      </div>

      <div class="fix_pro" ng-class="{'input_chosen':inputc == 2}">
        <input class="fix_input" placeholder="{{language == 0?'手机号码':'Phone'}}" ng-focus="choen(2)" ng-model="user.phone"/>
      </div>

      <div class="fix_pro" ng-class="{'input_chosen':inputc == 3}">
        <input class="fix_input" placeholder="{{language == 0?'省/市/区':'Province/City/Area'}}" ng-focus="choen(3)" ng-model="city_show_name1" readonly />
      </div>

      <div class="fix_pro1" ng-class="{'input_chosen':inputc == 4}">
        <textarea class="fix_input1" placeholder="{{language == 0?'详细街道地址':'Address'}}" ng-click="choen(4)" ng-model="user.area"></textarea>
      </div>

      <div class="fix_pro noborder" ng-click="changecheck()">
        <i class="iconfont icon-check" ng-if="user.is_default == 1"></i>
        <i class="iconfont icon-uncheck" ng-hide="user.is_default == 1"></i>
        {{language == 0?'设为默认地址':'Set as default'}}
      </div>

      <div class="w100 pd0_2 mt50" ng-click="addaddress()">
        <button class="ticket_buy1 tac">{{language == 0?'保存':'Save'}}<span></span></button>
      </div>

    </div>
  </div>

  <div class="city_mubu" ng-show="mubu1 == 1&&place1 == 2">
    <div class="province_content">
      <div class="province_box">
        <div class="province_box1">
          <p class="city_title">选择省份</p>
          <p class="city_title1" ng-repeat="list in citys" ng-click="showcity(list)">
            <span class="fl">{{list.name}}</span>
            <i class="iconfont icon-right fr"></i>
          </p>
        </div>
        <div class="cancle_city1">
          <div class="cancle_city" ng-click="cancle_city()">取消</div>
        </div>
      </div>
    </div>
  </div>

  <div class="city_mubu" ng-show="mubu1 == 2&&place1 == 2">
    <div class="province_content">
      <div class="province_box">
        <div class="province_box1">
          <p class="city_title">选择城市</p>
          <p class="city_title1" ng-repeat="list in citys1" ng-click="showcity1(list)">
            <span class="fl">{{list.name}}</span>
            <i class="iconfont icon-right fr"></i>
          </p>
        </div>
        <div class="cancle_city1">
          <div class="cancle_city" ng-click="cancle_city1()">取消</div>
        </div>
      </div>
    </div>
  </div>

  <div class="city_mubu" ng-show="mubu1 == 3&&place1 == 2">
    <div class="province_content">
      <div class="province_box">
        <div class="province_box1">
          <p class="city_title">选择区域</p>
          <p class="city_title1" ng-repeat="list in citys2" ng-click="showcity2(list)">
            <span class="fl">{{list.name}}</span>
            <i class="iconfont icon-right fr"></i>
          </p>
        </div>
        <div class="cancle_city1">
          <div class="cancle_city" ng-click="cancle_city2()">取消</div>
        </div>
      </div>
    </div>
  </div>

  <!-- 修改地址 -->
  <div class="normal_box mubu_place" ng-show="place1 == 3">
    <div class="top_header">
      <i class="iconfont icon-left top_icon1" ng-click="cancel_place()"></i>
      <span class="top_header_span" ng-click="cancel_place()">{{language == 0?'返回':'Back'}}</span>
    </div>

    <div class="normal_box pd16">
      <div class="fix_pro" ng-class="{'input_chosen':inputc == 1}">
        <input class="fix_input" placeholder="{{language == 0?'姓名':'Name'}}" ng-focus="choen1(1)" ng-model="user.name" />
      </div>

      <div class="fix_pro" ng-class="{'input_chosen':inputc == 2}">
        <input class="fix_input" placeholder="{{language == 0?'手机号码':'Phone'}}" ng-focus="choen1(2)" ng-model="user.phone"/>
      </div>

      <div class="fix_pro" ng-class="{'input_chosen':inputc == 3}">
        <input class="fix_input" placeholder="{{language == 0?'省/市/区':'Province/City/Area'}}" ng-focus="choen1(3)" ng-model="city_show_name2" readonly />
      </div>

      <div class="fix_pro1" ng-class="{'input_chosen':inputc == 4}">
        <textarea class="fix_input1" placeholder="{{language == 0?'详细街道地址':'Address'}}" ng-click="choen1(4)" ng-model="user.area"></textarea>
      </div>

      <div class="fix_pro noborder" ng-click="changecheck1()">
        <i class="iconfont icon-check" ng-if="user.is_default == 1"></i>
        <i class="iconfont icon-uncheck" ng-if="user.is_default == 0"></i>
        {{language == 0?'设为默认地址':'Set as default'}}
      </div>

      <div class="w50 pd0_12_0_2 mt50 fl" ng-click="addaddress_3()">
        <button class="ticket_buy2 tac">{{language == 0?'保存':'save'}}<span></span></button>
      </div>
      <div class="w50 pd0_2_0_12 mt50 fl" ng-click="cancleaddress()">
        <button class="ticket_buy2 tac">{{language == 0?'取消':'cancel'}}<span></span></button>
      </div>
      
    </div>
  </div>

  <div class="city_mubu" ng-show="mubu1 == 1&&place1 == 3">
    <div class="province_content">
      <div class="province_box">
        <div class="province_box1">
          <p class="city_title">选择省份</p>
          <p class="city_title1" ng-repeat="list in citys" ng-click="showcity_3(list)">
            <span class="fl">{{list.name}}</span>
            <i class="iconfont icon-right fr"></i>
          </p>
        </div>
        <div class="cancle_city1">
          <div class="cancle_city" ng-click="cancle_city()">取消</div>
        </div>
      </div>
    </div>
  </div>

  <div class="city_mubu" ng-show="mubu1 == 2&&place1 == 3">
    <div class="province_content">
      <div class="province_box">
        <div class="province_box1">
          <p class="city_title">选择城市</p>
          <p class="city_title1" ng-repeat="list in citys1" ng-click="showcity1_3(list)">
            <span class="fl">{{list.name}}</span>
            <i class="iconfont icon-right fr"></i>
          </p>
        </div>
        <div class="cancle_city1">
          <div class="cancle_city" ng-click="cancle_city1()">取消</div>
        </div>
      </div>
    </div>
  </div>

  <div class="city_mubu" ng-show="mubu1 == 3&&place1 == 3">
    <div class="province_content">
      <div class="province_box">
        <div class="province_box1">
          <p class="city_title">选择区域</p>
          <p class="city_title1" ng-repeat="list in citys2" ng-click="showcity2_3(list)">
            <span class="fl">{{list.name}}</span>
            <i class="iconfont icon-right fr"></i>
          </p>
        </div>
        <div class="cancle_city1">
          <div class="cancle_city" ng-click="cancle_city2()">取消</div>
        </div>
      </div>
    </div>
  </div>

  <div class="window" id="windowcenter" style="display: block;" ng-if="cancel_mark == 1">
    <div id="title" class="title">{{language == 0?'提示':'Hint'}}</div>
    <div class="content">
     <div id="txt">{{language == 0?'确认删除该地址？':'Are you sure to delete the address?'}}</div>
     <input type="button" value="{{language == 0?'是':'Yes'}}" name="是" class="txtbtn w50 fl" ng-click="delete(placeinfo)">
     <input type="button" value="{{language == 0?'否':'No'}}" name="否" class="txtbtn w50 fl" ng-click="cancel_delete()"> 
    </div>
  </div>

</ion-view>